﻿using System;
using System.Threading;
using System.Windows;
using Mvvm;


namespace LayoutPlanning.Model
{
    [Serializable]
    public class Point : BindableBase
    {
        private double _x;
        private double _y;
        private double _z;

        public Point()
        {
        }

        public Point(double x, double y)
        {
            _x = x;

            _y = y;
        }

        public Point(double x, double y, double z)
        {
            _x = x;

            _y = y;

            _z = z;
        }

        public double X
        {
            get { return _x; }
            set
            {
                if (_x == value)
                    return;

                _x = value;
                RaisePropertyChanged();
                //    RaisePropertyChanged("WindowsPoint");
            }
        }

        public double Y
        {
            get { return _y; }
            set
            {
                if (_y == value)
                    return;

                _y = value;

                RaisePropertyChanged();
                //      RaisePropertyChanged("WindowsPoint");
            }
        }

        public double Z
        {
            get { return _z; }
            set
            {
                if (_z == value)
                    return;

                _z = value;
                RaisePropertyChanged();
                //    RaisePropertyChanged("WindowsPoint");
            }
        }

        public static implicit operator Point(System.Windows.Point p)
        {
            return new Point(p.X, p.Y);
        }

        public static implicit operator System.Windows.Point(Point v)
        {
            return new System.Windows.Point(v.X, v.Y);
        }

        //public Windows.Foundation.Point WindowsPoint => new Windows.Foundation.Point(_x,_y);
    }
}